home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 7: Sunsite / Linux Cubed Series 7 - Sunsite Vol 1.iso / system / shells / scsh-0.4 / scsh-0 / scsh-0.4.2 / scsh / sunos / errno.scm < prev    next >
Text File  |  1995-10-13  |  5KB  |  159 lines

  1. ;;; Errno constant definitions.
  2. ;;; Copyright (c) 1993 by Olin Shivers.
  3.  
  4. ;;; These are the correct values for my SparcStation.
  5.  
  6. (define-syntax define-errnos
  7.   (syntax-rules ()
  8.     ((define-errnos form ...)
  9.      (begin (define-enum-constant "errno" . form) ...))))
  10.  
  11. (define errno/2big 7) ; 2big is not a legit Scheme symbol. Lose, lose.
  12.  
  13. (define-errnos
  14.   ;; POSIX:
  15.   (perm        1)        ; Operation not permitted
  16.   (noent    2)        ; No such file or directory
  17.   (srch        3)        ; No such process
  18.   (intr        4)        ; Interrupted function call
  19.   (io        5)        ; Input/output error
  20.   (nxio        6)        ; No such device or address
  21. ; (2big        7)        ; Arg list too long
  22.   (noexec    8)        ; Exec format error
  23.   (badf        9)        ; Bad file descriptor
  24.   (child    10)        ; No child processes
  25.   (again    11)        ; Resource temporarily unavailable
  26.   (nomem    12)        ; Not enough space
  27.   (acces    13)        ; Permission denied
  28.   (fault    14)        ; Bad address
  29.   (notblk    15)        ; Block device required
  30.   (busy        16)        ; Resource busy
  31.   (exist    17)        ; File exists
  32.   (xdev        18)        ; Improper link
  33.   (nodev    19)        ; No such device
  34.   (notdir    20)        ; Not a directory
  35.   (isdir    21)        ; Is a directory
  36.   (inval    22)        ; Invalid argument
  37.   (nfile    23)        ; Too many open files in system
  38.   (mfile    24)        ; Too many open files
  39.   (notty    25)        ; Inappropriate I/O control operation
  40.   (xtbsy    26)        ; Text file busy
  41.   (fbig        27)        ; File too large
  42.   (nospc    28)        ; No space left on device
  43.   (spipe    29)        ; Invalid seek
  44.   (rofs        30)        ; Read-only file system
  45.   (mlink    31)        ; Too many links
  46.   (pipe        32)        ; Broken pipe
  47.  
  48.   ;; POSIX:
  49.   ;; math software
  50.   (dom        33)        ; Domain error
  51.   (range    34)        ; Result too large
  52.  
  53.   ;; non-blocking and interrupt i/o
  54.   (wouldblock    35)        ; Operation would block
  55.   (inprogress    36)        ; Operation now in progress
  56.   (already    37)        ; Operation already in progress
  57.  
  58.   ;; ipc/network software
  59.   
  60.   ;; argument errors
  61.   (notsock    38)        ; Socket operation on non-socket
  62.   (destaddrreq    39)        ; Destination address required
  63.   (msgsize    40)        ; Message too long
  64.   (prototype    41)        ; Protocol wrong type for socket
  65.   (noprotoopt    42)        ; Protocol not available
  66.   (protonosupport 43)        ; Protocol not supported
  67.   (socktnosupport 44)        ; Socket type not supported
  68.   (opnotsupp    45)        ; Operation not supported on socket
  69.   (pfnosupport    46)        ; Protocol family not supported
  70.   (afnosupport    47)        ; Address family not supported by protocol family
  71.   (addrinuse    48)        ; Address already in use
  72.   (addrnotavail    49)        ; Can't assign requested address
  73.   
  74.   ;; operational errors
  75.   (netdown    50)        ; Network is down
  76.   (netunreach    51)        ; Network is unreachable
  77.   (netreset    52)        ; Network dropped connection on reset
  78.   (connaborted    53)        ; Software caused connection abort
  79.   (connreset    54)        ; Connection reset by peer
  80.   (nobufs    55)        ; No buffer space available
  81.   (isconn    56)        ; Socket is already connected
  82.   (notconn    57)        ; Socket is not connected
  83.   (shutdown    58)        ; Can't send after socket shutdown
  84.   (toomanyrefs    59)        ; Too many references: can't splice
  85.   (timedout    60)        ; Connection timed out
  86.   (connrefused    61)        ; Connection refused
  87.   
  88.   (loop        62)        ; Too many levels of symbolic links
  89.   
  90.   ;; POSIX:
  91.   (nametoolong    63)        ; File name too long
  92.   
  93.   ;; should be rearranged
  94.   (hostdown    64)        ; Host is down
  95.   (hostunreach    65)        ; No route to host
  96.   
  97.   ;; POSIX:
  98.   (notempty    66)        ; Directory not empty
  99.   
  100.   ;; quotas & mush
  101.   (proclim    67)        ; Too many processes
  102.   (users    68)        ; Too many users
  103.   (dquot    69)        ; Disc quota exceeded
  104.   
  105.   ;; Network File System
  106.   (stale    70)        ; Stale NFS file handle
  107.   (remote    71)        ; Too many levels of remote in path
  108.   
  109.   ;; streams
  110.   (nostr    72)        ; Device is not a stream
  111.   (time        73)        ; Timer expired
  112.   (nosr        74)        ; Out of streams resources
  113.   (nomsg    75)        ; No message of desired type
  114.   (badmsg    76)        ; Trying to read unreadable message
  115.   
  116.   ;; SystemV IPC
  117.   (idrm        77)        ; Identifier removed
  118.   
  119.   ;; POSIX
  120.   ;; SystemV Record Locking
  121.   (deadlk    78)        ; Resource deadlock avoided
  122.   (nolck    79)        ; No locks available
  123.   
  124.   ;; RFS
  125.   (nonet    80)        ; Machine is not on the network
  126.   (rremote    81)        ; Object is remote
  127.   (nolink    82)        ; the link has been severed
  128.   (adv        83)        ; advertise error
  129.   (srmnt    84)        ; srmount error
  130.   (comm        85)        ; Communication error on send
  131.   (proto    86)        ; Protocol error
  132.   (multihop    87)        ; multihop attempted
  133.   (dotdot    88)        ; Cross mount point (not an error)
  134.   (remchg    89)        ; Remote address changed
  135.   
  136.   ;; POSIX
  137.   (nosys    90))        ; function not implemented
  138.  
  139. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  140. ; Non-POSIX messages
  141. ; Some of these SunOS messages are better. Some are stupid.
  142. ;
  143. ; Error     SunOS                    POSIX
  144. ; perm     Not owner                Operation not permitted
  145. ; intr     Interrupted system call        Interrupted function call
  146. ; io     I/O error                Input/output error
  147. ; badf     Bad file number            Bad file descriptor
  148. ; child     No children                No child processes
  149. ; again  No more processes            Resource temporarily unavailable   
  150. ; nomem     Not enough core             Not enough space
  151. ; busy     Mount device busy            Resource busy
  152. ; xdev     Cross-device link            Improper link
  153. ; nfile     File table overflow            Too many open files in system
  154. ; notty     Not a typewriter            Inappropriate I/O control operation
  155. ; spipe     Illegal seek                Invalid seek
  156. ; dom     Argument too large            Domain error
  157. ; deadlk Deadlock condition            Resource deadlock avoided
  158. ; nolck     No record locks available        No locks available
  159.